﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cmp.Web.Common
{
    /// <summary>
    /// 自定义json返回对象
    /// </summary>
    public class MJsonResult
    {
        int code = 0;
        string msg = "";
        object result = null;
        public MJsonResult(int code, string msg, object result)
        {
            this.code = code;
            this.msg = msg;
            this.result = result;
        }
        public JsonResult GetResult()
        {
            return new JsonResult(new { code = code, msg = msg, result = result });
        }
    }
}
